//
// Created by wkm on 2024-04-21.
//

#include "sbox_test.h"

void sbox_test() {

    sc_clock clk("myclk", 2, sc_core::SC_NS);
    sc_signal<exe_state> done;
    sc_signal<bool> en_read;
    sc_signal<sc_uint<DATA_SIZE>> in1, in2, in3, in4, in5, in6, in7, in8,
            in9, in10, in11, in12, in13, in14, in15, in16,
            out1, out2, out3, out4, out5, out6, out7, out8,
            out9, out10, out11, out12, out13, out14, out15, out16;

    sbox my_sbox("my_sbox");
    my_sbox.en_read(en_read);
    my_sbox.clk(clk);
    my_sbox.addr1(in1);
    my_sbox.addr2(in2);
    my_sbox.addr3(in3);
    my_sbox.addr4(in4);
    my_sbox.addr5(in5);
    my_sbox.addr6(in6);
    my_sbox.addr7(in7);
    my_sbox.addr8(in8);
    my_sbox.addr9(in9);
    my_sbox.addr10(in10);
    my_sbox.addr11(in11);
    my_sbox.addr12(in12);
    my_sbox.addr13(in13);
    my_sbox.addr14(in14);
    my_sbox.addr15(in15);
    my_sbox.addr16(in16);
    my_sbox.done(done);
    my_sbox.out_data1(out1);
    my_sbox.out_data2(out2);
    my_sbox.out_data3(out3);
    my_sbox.out_data4(out4);
    my_sbox.out_data5(out5);
    my_sbox.out_data6(out6);
    my_sbox.out_data7(out7);
    my_sbox.out_data8(out8);
    my_sbox.out_data9(out9);
    my_sbox.out_data10(out10);
    my_sbox.out_data11(out11);
    my_sbox.out_data12(out12);
    my_sbox.out_data13(out13);
    my_sbox.out_data14(out14);
    my_sbox.out_data15(out15);
    my_sbox.out_data16(out16);

    sbox_driver my_sbox_driver("my_sbox_driver");
    my_sbox_driver.d_en_read(en_read);
    my_sbox_driver.d_clk(clk);
    my_sbox_driver.d_addr1(in1);
    my_sbox_driver.d_addr2(in2);
    my_sbox_driver.d_addr3(in3);
    my_sbox_driver.d_addr4(in4);
    my_sbox_driver.d_addr5(in5);
    my_sbox_driver.d_addr6(in6);
    my_sbox_driver.d_addr7(in7);
    my_sbox_driver.d_addr8(in8);
    my_sbox_driver.d_addr9(in9);
    my_sbox_driver.d_addr10(in10);
    my_sbox_driver.d_addr11(in11);
    my_sbox_driver.d_addr12(in12);
    my_sbox_driver.d_addr13(in13);
    my_sbox_driver.d_addr14(in14);
    my_sbox_driver.d_addr15(in15);
    my_sbox_driver.d_addr16(in16);

    sbox_monitor my_sbox_monitor("my_sbox_monitor");
    my_sbox_monitor.m_done(done);
    my_sbox_monitor.m_data1(out1);
    my_sbox_monitor.m_data2(out2);
    my_sbox_monitor.m_data3(out3);
    my_sbox_monitor.m_data4(out4);
    my_sbox_monitor.m_data5(out5);
    my_sbox_monitor.m_data6(out6);
    my_sbox_monitor.m_data7(out7);
    my_sbox_monitor.m_data8(out8);
    my_sbox_monitor.m_data9(out9);
    my_sbox_monitor.m_data10(out10);
    my_sbox_monitor.m_data11(out11);
    my_sbox_monitor.m_data12(out12);
    my_sbox_monitor.m_data13(out13);
    my_sbox_monitor.m_data14(out14);
    my_sbox_monitor.m_data15(out15);
    my_sbox_monitor.m_data16(out16);

    sc_start();
}